<template>
	<view class="btnFix" v-if="!appAuditState">
		<view class="btn btn1" @click="checkIdentity('/pages/issueWork/index?title='+'发布工作',2)">
			<u-icon name="edit-pen-fill"></u-icon>

			<text class="u-margin-left-10">发布招工</text>
		</view>

		<view class=" btn btn2" @click="checkIdentity('/pages/issueWork/index?title='+'找工作',1)">
			<u-icon name="edit-pen-fill"></u-icon>
			<text class="u-margin-left-10">找工作</text>
		</view>
	</view>
</template>

<script>
	import check from '@/common/check.js';
	export default {
		name: "identityBtn",
		data() {
			return {
                 appAuditState:''
			}
		},
		created() {
			this.getConfig()
		},
		methods: {
			getConfig() {
							this.$u.api.getConfig().then(res => {
								this.appAuditState = Number(res.appAuditState) ;
							})
						},
			checkIdentity(page,Identity){
				check.checkIdentity(page,Identity).then(res=>{
					console.log(res)
				})
			},
		},
	}
</script>

<style>
	.btnFix {
		position: fixed;
		bottom: 30rpx;
		width: 100%;
		display: flex;
		z-index: 999;
		left: 17%;

	}

	.btn {
		width: 240rpx;
		height: 90rpx;

		border-radius: 40rpx;
		text-align: center;
		line-height: 90rpx;
		color: #fff;
	}

	.btn1 {
		background: linear-gradient(180deg, #3471FD 0%, #3D9BE8 100%);
	}

	.btn2 {
		background: linear-gradient(180deg, #F68F2B 0%, #F5B136 100%);
		margin-left: 20rpx;
	}
</style>
